package net.m510.autosurfer.core.log;

import java.util.logging.LogRecord;
import java.util.logging.StreamHandler;

public class StandardConsoleHandler extends StreamHandler {
	public StandardConsoleHandler() {
		setOutputStream(System.out);
	}

	/* (non-Javadoc)
	 * @see java.util.logging.StreamHandler#close()
	 */
	@Override
	public synchronized void close() throws SecurityException {
		super.close();
		flush();
	}

	/* (non-Javadoc)
	 * @see java.util.logging.StreamHandler#publish(java.util.logging.LogRecord)
	 */
	@Override
	public synchronized void publish(LogRecord record) {
		super.publish(record);
		flush();
	}
}
